
local maxSpeed = achievements.GetValue( "Rush Hour", "total", 0 )
local function CheckSpeed()
	local veh = LocalPlayer():GetVehicle()
	if ( !veh:IsValid() ) then return end
	local speed = math.floor( math.min( veh:GetVelocity():Length() / 17.6, 100 ) )

	if ( speed <= maxSpeed ) then return end
	
	achievements.Update( "Rush Hour", speed / 100, speed .. "/100" )
	achievements.SetValue( "Rush Hour", "total", speed )
	
	maxSpeed = speed
end
timer.Create( "Achievements.RushHour", 1, 0, CheckSpeed )

achievements.Register( "Rush Hour", "Travel at 100mph in a vehicle.", "achievements/rushhour", maxSpeed / 100, maxSpeed .. "/100" )
